<template>
  <div class="page">
    <div class="form">
      <div class="logo">用户登录</div>
      <el-form :model="form" label-width="120px">
        <el-form-item label="用户名">
          <el-input v-model="form.username" />
        </el-form-item>
        <el-form-item label="密码">
          <el-input v-model="form.password" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">登录</el-button>
          <router-link to="/">取消</router-link>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script setup>
import { reactive } from "vue"
import { useGlobalStore } from "@/store/index.js";
const store = useGlobalStore()
store.setUsername("管理员1")

const form = reactive({

})
</script>
 
<style scoped>
.form {
  max-width: 300px;
  text-align: center;
  margin: 10px auto;
}
</style>
